Fix dead code lints on Windows
authorJethro Beekman <jethro@jbeekman.nl>
Tue, 19 Apr 2016 20:55:37 +0000 (13:55 -0700)
committerJethro Beekman <jethro@jbeekman.nl>
Tue, 19 Apr 2016 20:55:37 +0000 (13:55 -0700)
tests/test_cargo.rs

index 4d9bb36bdf8e2f90881357b7f2bce221f3de6729..ebd69024cc2c449692354fc8210c5fff1673a6d2 100644 (file)
@@ -7,12 +7,13 @@ use std::str;
 
 use cargo_process;
 use support::paths;
-use support::{cargo_dir, execs, project, mkdir_recursive, ProjectBuilder, ERROR};
+use support::{execs, project, mkdir_recursive, ProjectBuilder, ERROR};
 use hamcrest::{assert_that};
 
 fn setup() {
 }
 
+#[cfg_attr(windows,allow(dead_code))]
 enum FakeKind<'a> {
     Executable,
     Symlink{target:&'a Path},
@@ -78,6 +79,8 @@ test!(list_command_looks_at_path {
 // windows and symlinks don't currently agree that well
 #[cfg(unix)]
 test!(list_command_resolves_symlinks {
+    use support::cargo_dir;
+
     let proj = project("list-non-overlapping");
     let proj = fake_file(proj, &Path::new("path-test"), "cargo-2",
                          FakeKind::Symlink{target:&cargo_dir().join("cargo")});